#指定镜像，这里用网易云仓库的java8镜像
FROM hub.c.163.com/library/java:8-jre

#COPY *.jar /app.jar

#CMD ["--service.port=8080"]
# 设置环境变量
ENV TZ=Asia/Shanghai
ENV JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom"

# 设置时区
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 创建目录
RUN mkdir -p /continue-service
# 设置工作空间
WORKDIR /continue-service
# 暴露端口申明
EXPOSE 8080

#将当前target目录下的jar 放置在根目录下， 并重新命名
ADD target/continue-1.0.0-SNAPSHOT.jar continue-service.jar
ADD target/classes/application.yml application.yml
ADD target/classes/application-druid.yml application-druid.yml
# 执行命令
CMD java $JAVA_OPTS -jar continue-service.jar
#ENTRYPOINT ["java","-jar","/continue.jar"]